import {
	msg
} from "@/utils/msg.ts"
import {
	kingdeeQuery,
} from "@/network/apis.ts";
import useKingdeeIsSuccess from "@/hooks/useKingdeeIsSuccess";
/* 
 获取物料信息
 */
export default async function(code) {

	let valueData = []


	const {
		data: res
	} = await kingdeeQuery({
		formId: "BD_MATERIAL",
		fieldKeys: `FName,F_BLU_CPZXBZ.FDataValue as CPZXBZ,FMATERIALID`,
		filterString: `FMATERIALID  = ${code.split("|")[3]}`,
		limit: '20'
	});


	valueData = useKingdeeIsSuccess("GET", res)



	return {
		valueData
	}
}